package com.itheima.kafka.controller;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class HelloListener {

    @KafkaListener(topics = {"article-kafka"})
    public void listener(ConsumerRecord<?, ?> record) {
       System.out.println(record.key() + "===========" + record.value());
    }
}